Fly3D SDK

Tutorials

Home

Tutorial 7

Adding Fly3D plug-ins

· Introduction

At this point a level has been created and preprocessed but there are no dynamic objects included in the level and thus no game to execute. This tutorial enables experimentation with the supplied plug-ins to give a introduction to the nature of game development using plug-in architecture as a development tool.

After completing this tutorial you will have a executable game.

· flyEditor operations

1) open the script file from tutorial 4 with the flyEditor

2) right click the plug-ins tree item and select insert from the popup menu

3) an open dialogue will show up, and you should select the walk.dll.

4) now we need to create a new person object from the walk.dll. This will be the player. Right click the person tree item and select insert from the popup menu. A new person object will be created and you can set its name to a chosen name like 'myplayer'.

5) fill in the following person object properties for your new player:

complex behavior can only be achieved using a large number of parameters, you can start using default values for this and experiment with different settings for parameters of your choice.

Parameter Value Description
colflag 1 sets collision on/off
mass 1 sets player mass (in this case >0)
radius 1 sets player collision radius (player collides as a sphere)
bump 1 bouncing factor (0.0 to 1.0)
friction 1 sliding factor (0.0 to 1.0)
active 1 activate on startup
height 18.5 player height (1.85m)
jumpforce 0.006 jump force (use space key to jump)
jumpforcetime 100 jump time
gravity 0.002 gravity applied to player
walkvel 0.2 walk velocity (use s,x,q,e keys to move)
rotvel 0.1 keyboard rotation factor (use arrows to rotate view)
mousespeed 0.2 mouse rotation factor (use mouse to rotate view)
zoomtime 300 zoom time in ms (use right mouse click to zoom)
zoomangle1 60 standard view angle
zoomangle2 20 zoom view angle
shield 1 player shield

6) Press the Save and Restart button on the tool bar or select the Flile/Restart menu option to restart the scene (this will activate all objects set to activate on startup)

7) Select the global tree view item and change the following global parameters:

Parameter Value Description
viewmindist 1 near plane distance
viewmaxdist 1500 far plane distance
player myplayer sets the player object
camera myplayer sets the camera object
camangle 60 player camera angle
mapmode 1-15 selects mapping layers (bit flag):

bit 1 for texture map
bit 2 for detail map
bit 3 for light map
bit 4 for fog map

use 1 for texture only
use 5 for texture and lightmap
use 15 for all maping layers

8) Now you are ready to walk around. Turn the render on by selecting OpenGL on the tool bar or using the menu render option. Start simmulatig clicking the Simmulate tool bar button or using the F4 key. You should see the level from the players point of view in the render window (notice that as no birth pads have been created yet, the player will start up at co-ordinates 0,0,0 that must be inside the level).

9) Select the render window by clicking on it (or use the TAB key) and you should be able to move around.